// License Notification
//======================================================
// Copyright (c) 2010 Channel Intelligence Inc.
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// which accompanies this distribution, and is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// ======================================================




namespace CIP4.Common
{
    public enum MajorEnum
    {
        /// <summary>
        /// Current operation did not complete successfully
        /// </summary>
        Error = 1,

        /// <summary>
        /// Current operation completed successfully but did not have the usual outcome (notfound on search for example)
        /// </summary>
        Warning = 2,
        
        /// <summary>
        /// Current operation completed successfully - this should be invariant with respect to provider or serialization strategy
        /// </summary>
        Information = 3,
        
        /// <summary>
        /// Information about the processing of the current operation - this can vary by provider type
        /// </summary>
        Trace = 4,
        
        /// <summary>
        /// For example, heartbeat and timer messages - noise messages should not written to a permanent log and 
        /// should take minimal space in a UI. For example, in a command line, if two consecutive messages are Noise
        /// messages, the second should overwrite the first
        /// </summary>
        Noise = 5
    }

    public enum MinorEnum
    {
        Generic = 0, // catch all
        NoCollectionSpecified = 1,
        DataProviderConnectionMissing = 2,
        LoadedProvider = 3,
        ErrorLoadingProvider = 4,
        ExternalIDMustHaveAValue = 5,
        CassandraError = 6,
        ErrorDeletingCollection = 7,
        DeleteCollection = 8,
        FailOnLinearSearch = 9,
        ErrorGettingItemsFromProvider = 10,
        PurgeItems = 11,
        SaveItems = 12, 
        ItemsUpdated = 18,
        ItemsAdded = 19,
        UnexpectedConnectionType = 13,  // unlucky for some -- if this ever happens the CIP4 code is messed up
        ItemDeleted = 14,
        ItemSaved = 15,
        NothingDeleted = 16,
        DuplicateExternalID = 17,
        DuplicateParameterItems = 20,
        InitializingProvider = 21,
        ErrorPurgingItems = 22,
        ErrorSavingItems = 23,
        RetryAccessingDataStore = 24,
        RetryCountExceeded = 25,
        SuccessfulCacheFetch = 26,
        MissingExternalIDAndPublishedID = 27,
        UnexpectedDatabaseVersion = 28,
        DataSourceNotReachable = 29,
        UnrecognizedTypeInThisContext = 30,
        CacheHit = 31,
        S3GetItems = 32,
        SoapExceptionOnGet = 33,
        S3PurgeItems = 34,
        S3SoapExceptionOnPurge = 35,
        S3SaveItems = 36,
        S3SoapExceptionOnSave = 37,
        S3PleaseTryAgain = 38,
        S3InternalError = 39,
        UnableToCreateS3Bucket = 40,
        TheRemoteServeReturnedAnError404NotFound = 41,
        SerializationError = 42,
        InsufficientInformationToBuildAConnection = 43,
        CannotFndSerializerType = 44,
        CannotFndSerializerAssembly = 45,
        CannotLoadSerializerAssembly = 46,
        CannotFindSerializerFunction = 47,
        CannotFindDeSerializerFunction = 48,
        ExpressionStructure = 49,
        AssemblyPathDoesNotExist = 50,
        ActionStart = 51,
        GetItems = 52,
        SpontaneousSerializer = 53,
        UnsupportedXpathExpression = 54,
        InvalidQuery = 55,
        LoadingSerializer = 56,
        StaleItemOnSave = 57,
        CIP4HomeResetAttempt = 58,
        SerializerBuildMutexTrace = 59,
        AssemblyAddedToAssemblyCache = 60,
        CassandraKeySpaceDoesntExist = 61,
        ColumnFamilyCreated = 62,
        ColumnFamilyCreateFailed = 63,
        ExceptionCreatingColumnFamily = 64,
        KeySpaceCreated = 65,
        UnableToAcessKeySpaceAfterCreate = 66,
        ExceptionCreatingKeySpace = 67,
        JsonParseError = 68,
        ErrorResolvingBus = 69,
        TimedOut = 70,
        NoAvailableConnection = 71,
        QueryText = 72,
    }

}